<?php

class TemplateTrait
{
	public $Template = 'Default.tpl';
	
	public function GetTemplatePath( )
	{
		if( isset( $this->TraitOwner->Module ) )
		{
			return implode( '/', array( $this->GetModulePath( ), $this->Template ) );	
		}
		else
		{
			return $this->Template;
		}
	}
	
	public function GetModulePath( )
	{
		return App::$Current->Modules[$this->TraitOwner->Module]->Path;	
	}
}

?>